home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / PlainTalk / Speech Recognition / Goodies / TestClient / Read Me next >
Encoding:
Text File  |  1995-06-23  |  3.2 KB  |  78 lines  |  [TEXT/MPS ]

  1. TestClient Native is an application used by the Speech Recognition group to test the
  2. functionality of the Speech Recognition API.  While some features have been disabled
  3. in this version, it is still very useful for prototyping different language models 
  4. which can be easily read in from a text file.  One such example text file, 
  5. 'Test Grammar.tc,' is provided.
  6.  
  7. Basic instructions:
  8. 1) Launch TestClient Native.
  9. 2) Choose 'Open… Live Desktop' from the file Menu.  This allocates a recognizer and opens
  10. a window onto the state of the recognizer.
  11. 3) Click 'Start Listening'.  Now when you speak, recognition results are posted as text;
  12. otherwise no action is taken.
  13. 4) To see the currently active language model (what the recognizer is listening for)
  14. choose 'Paste Grammar' from the Grammar menu.
  15. 5) To select another built in grammar, choose it from the Grammar menu.
  16. 6) To select another file-based grammar, choose 'Open Grammar…' from the Grammar menu.
  17. TestClient Native will parse the text file, making the necessary Speech Recognition API
  18. calls to build the language model described in the file.  If there's a problem with
  19. the content of the file, TestClient Native will do its best to let you know why.
  20.  
  21. There are also controls allowing one to request Begin-Detect notification.  When this
  22. option is used, the recognizer will enter the 'Search Waiting' state until you click
  23. the 'Continue Recognition' button (this is useful when one wishes to build language
  24. models dynamically). Another check box allows one to specify whether the recognition 
  25. results should be delivered by AppleEvent or callback.  The 'Speed vs. Accuracy' pop 
  26. up sets the kSpeedVsAccuracyParam of the recognizer to 0, 35 or 80, for Accurate, 
  27. Compromise and Fast, respectively.  Finally you can experiment with mulitiple
  28. recognizers, however TestClient Native uses the default behavior:  When it is the foreground
  29. application, applications in the background will not get recognition results, even if
  30. they are listening.
  31.  
  32. Here's a complete description of the grammar used by TestClient Native to parse language model
  33. descriptions:
  34.  
  35.     Backus-Naur Form Context Free Grammar for PlainTalk Language Models:
  36.  
  37.     <ws> ::==                                 // white space; explicit references to <ws> have been
  38.         ' '  |                                // left out of the following productions,
  39.         '\n' |                                // however <ws>* is assumed to delimit each
  40.         '\t';                                // terminal & nonterminal in each production.
  41.     
  42.     <language model assignment> ::==
  43.         <lhs> '=' <rhs> ';'
  44.     
  45.     <lhs> ::==
  46.         <lm> |                                // default finishing (kAddPauses)
  47.         '[' <lm> ']' |                        // + Optional
  48.         <lm> '*' |                            // + Repeat
  49.         <lm> 'j' '=' <number>                // + reJection
  50.         <lm> <flagSpec>                        // + arbitrary flag combination
  51.         
  52.     <flagSpec> = 'ronpj' | ...  | 'RONPj' | // ...=> all possible upper/lower case
  53.                  'ronpJ' '=' <number> |        // combinations of 'RONPJ'
  54.                  .                            // allows setting of Repeat, Optional,
  55.                  .                            // Noise, Pauses & reJection flags 
  56.                  .                            // independently.
  57.                  'RONPJ' '=' <number>;
  58.     
  59.     <number> ::== [0-9]+
  60.         
  61.     <lm> ::==
  62.         '<' <word> '>'
  63.         
  64.     <word> ::== 
  65.         [[a-z,A-Z,',",-,0-9]]                // standard pascal identifier with ' & "
  66.     
  67.     <rhs> ::==
  68.         <phrase> |
  69.         <phrase> '|' <rhs>
  70.         
  71.     <phrase> ::==
  72.         <word> |
  73.         <lm> |
  74.         <word> <phrase> |
  75.         <lm> <phrase>        
  76.         
  77.     NOTE that default finishing adds pauses.
  78.